home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / GXMath.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  14.1 KB  |  591 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        GXMath.a
  3. ;
  4. ;    Contains:    QuickDraw GX math routine interfaces.
  5. ;
  6. ;    Version:    Technology:    Quickdraw GX 1.1
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__GXMATH__') = 'UNDEFINED' THEN
  19. __GXMATH__ SET 1
  20.  
  21.     IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
  22.     include 'ConditionalMacros.a'
  23.     ENDIF
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27.     IF &TYPE('__FIXMATH__') = 'UNDEFINED' THEN
  28.     include 'FixMath.a'
  29.     ENDIF
  30.  
  31.  
  32. gxPoint                    RECORD 0
  33. x                         ds.l    1                ; offset: $0 (0)
  34. y                         ds.l    1                ; offset: $4 (4)
  35. sizeof                     EQU *                    ; size:   $8 (8)
  36.                         ENDR
  37. ; typedef unsigned short                 gxColorValue
  38.  
  39. gxPolar                    RECORD 0
  40. radius                     ds.l    1                ; offset: $0 (0)
  41. angle                     ds.l    1                ; offset: $4 (4)
  42. sizeof                     EQU *                    ; size:   $8 (8)
  43.                         ENDR
  44. gxMapping                RECORD 0
  45. map                         ds.l    3 * 3            ; offset: $0 (0)
  46. sizeof                     EQU *                    ; size:   $24 (36)
  47.                         ENDR
  48.  
  49.  
  50. gxColorValue1                    EQU        $0000FFFF            ; gxColorValue 1.0 
  51.  
  52. gxPositiveInfinity                EQU        $7FFFFFFF            ; for Fixed and Fract 
  53. gxNegativeInfinity                EQU        $80000000            ; for Fixed and Fract 
  54.  
  55. ;
  56. ; extern gxMapping *CopyToMapping(gxMapping *target, const gxMapping *source)
  57. ;
  58.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  59.         Macro
  60.         _CopyToMapping
  61.             move.w              #$0031,D0
  62.             dc.w                $A832
  63.         EndM
  64.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  65.         IMPORT_CFM_FUNCTION CopyToMapping
  66.     ENDIF
  67.  
  68. ;
  69. ; extern gxMapping *InvertMapping(gxMapping *target, const gxMapping *source)
  70. ;
  71.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  72.         Macro
  73.         _InvertMapping
  74.             move.w              #$0032,D0
  75.             dc.w                $A832
  76.         EndM
  77.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  78.         IMPORT_CFM_FUNCTION InvertMapping
  79.     ENDIF
  80.  
  81. ;
  82. ; extern gxMapping *MapMapping(gxMapping *target, const gxMapping *source)
  83. ;
  84.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  85.         Macro
  86.         _MapMapping
  87.             move.w              #$0033,D0
  88.             dc.w                $A832
  89.         EndM
  90.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  91.         IMPORT_CFM_FUNCTION MapMapping
  92.     ENDIF
  93.  
  94. ;
  95. ; extern gxMapping *MoveMapping(gxMapping *target, Fixed hOffset, Fixed vOffset)
  96. ;
  97.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  98.         Macro
  99.         _MoveMapping
  100.             move.w              #$0034,D0
  101.             dc.w                $A832
  102.         EndM
  103.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  104.         IMPORT_CFM_FUNCTION MoveMapping
  105.     ENDIF
  106.  
  107. ;
  108. ; extern gxMapping *MoveMappingTo(gxMapping *target, Fixed hPosition, Fixed vPosition)
  109. ;
  110.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  111.         Macro
  112.         _MoveMappingTo
  113.             move.w              #$0035,D0
  114.             dc.w                $A832
  115.         EndM
  116.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  117.         IMPORT_CFM_FUNCTION MoveMappingTo
  118.     ENDIF
  119.  
  120. ;
  121. ; extern gxMapping *NormalizeMapping(gxMapping *target)
  122. ;
  123.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  124.         Macro
  125.         _NormalizeMapping
  126.             move.w              #$0036,D0
  127.             dc.w                $A832
  128.         EndM
  129.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  130.         IMPORT_CFM_FUNCTION NormalizeMapping
  131.     ENDIF
  132.  
  133. ;
  134. ; extern gxMapping *RotateMapping(gxMapping *target, Fixed angle, Fixed xCenter, Fixed yCenter)
  135. ;
  136.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  137.         Macro
  138.         _RotateMapping
  139.             move.w              #$0037,D0
  140.             dc.w                $A832
  141.         EndM
  142.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  143.         IMPORT_CFM_FUNCTION RotateMapping
  144.     ENDIF
  145.  
  146. ;
  147. ; extern gxMapping *ScaleMapping(gxMapping *target, Fixed hFactor, Fixed vFactor, Fixed xCenter, Fixed yCenter)
  148. ;
  149.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  150.         Macro
  151.         _ScaleMapping
  152.             move.w              #$0038,D0
  153.             dc.w                $A832
  154.         EndM
  155.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  156.         IMPORT_CFM_FUNCTION ScaleMapping
  157.     ENDIF
  158.  
  159. ;
  160. ; extern gxMapping *ResetMapping(gxMapping *target)
  161. ;
  162.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  163.         Macro
  164.         _ResetMapping
  165.             move.w              #$0039,D0
  166.             dc.w                $A832
  167.         EndM
  168.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  169.         IMPORT_CFM_FUNCTION ResetMapping
  170.     ENDIF
  171.  
  172. ;
  173. ; extern gxMapping *SkewMapping(gxMapping *target, Fixed skewX, Fixed skewY, Fixed xCenter, Fixed yCenter)
  174. ;
  175.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  176.         Macro
  177.         _SkewMapping
  178.             move.w              #$003A,D0
  179.             dc.w                $A832
  180.         EndM
  181.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  182.         IMPORT_CFM_FUNCTION SkewMapping
  183.     ENDIF
  184.  
  185. ;
  186. ; extern void MapPoints(const gxMapping *source, long count, gxPoint vector[2147483647])
  187. ;
  188.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  189.         Macro
  190.         _MapPoints
  191.             move.w              #$003B,D0
  192.             dc.w                $A832
  193.         EndM
  194.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  195.         IMPORT_CFM_FUNCTION MapPoints
  196.     ENDIF
  197.  
  198. ;
  199. ; extern short FirstBit(unsigned long x)
  200. ;
  201.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  202.         Macro
  203.         _FirstBit
  204.             move.w              #$003C,D0
  205.             dc.w                $A832
  206.         EndM
  207.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  208.         IMPORT_CFM_FUNCTION FirstBit
  209.     ENDIF
  210.  
  211. ;
  212. ; extern short WideScale(const wide *source)
  213. ;
  214.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  215.         Macro
  216.         _WideScale
  217.             move.w              #$003D,D0
  218.             dc.w                $A832
  219.         EndM
  220.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  221.         IMPORT_CFM_FUNCTION WideScale
  222.     ENDIF
  223.  
  224. ;
  225. ; extern short LinearRoot(Fixed first, Fixed last, Fract t[2147483647])
  226. ;
  227.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  228.         Macro
  229.         _LinearRoot
  230.             move.w              #$003E,D0
  231.             dc.w                $A832
  232.         EndM
  233.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  234.         IMPORT_CFM_FUNCTION LinearRoot
  235.     ENDIF
  236.  
  237. ;
  238. ; extern short QuadraticRoot(Fixed first, Fixed control, Fixed last, Fract t[2147483647])
  239. ;
  240.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  241.         Macro
  242.         _QuadraticRoot
  243.             move.w              #$003F,D0
  244.             dc.w                $A832
  245.         EndM
  246.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  247.         IMPORT_CFM_FUNCTION QuadraticRoot
  248.     ENDIF
  249.  
  250. ;
  251. ; extern gxPoint *PolarToPoint(const gxPolar *ra, gxPoint *xy)
  252. ;
  253.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  254.         Macro
  255.         _PolarToPoint
  256.             move.w              #$0040,D0
  257.             dc.w                $A832
  258.         EndM
  259.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  260.         IMPORT_CFM_FUNCTION PolarToPoint
  261.     ENDIF
  262.  
  263. ;
  264. ; extern gxPolar *PointToPolar(const gxPoint *xy, gxPolar *ra)
  265. ;
  266.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  267.         Macro
  268.         _PointToPolar
  269.             move.w              #$0041,D0
  270.             dc.w                $A832
  271.         EndM
  272.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  273.         IMPORT_CFM_FUNCTION PointToPolar
  274.     ENDIF
  275.  
  276. ;
  277. ; extern Fract FractCubeRoot(Fract source)
  278. ;
  279.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  280.         Macro
  281.         _FractCubeRoot
  282.             move.w              #$0042,D0
  283.             dc.w                $A832
  284.         EndM
  285.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  286.         IMPORT_CFM_FUNCTION FractCubeRoot
  287.     ENDIF
  288.  
  289. ;
  290. ; extern Fract FractDivide(Fract dividend, Fract divisor)
  291. ;
  292.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  293.         Macro
  294.         _FractDivide
  295.             move.w              #$0043,D0
  296.             dc.w                $A832
  297.         EndM
  298.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  299.         IMPORT_CFM_FUNCTION FractDivide
  300.     ENDIF
  301.  
  302. ;
  303. ; extern Fract FractMultiply(Fract multiplicand, Fract multiplier)
  304. ;
  305.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  306.         Macro
  307.         _FractMultiply
  308.             move.w              #$0044,D0
  309.             dc.w                $A832
  310.         EndM
  311.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  312.         IMPORT_CFM_FUNCTION FractMultiply
  313.     ENDIF
  314.  
  315. ;
  316. ; extern Fract FractSineCosine(Fixed degrees, Fract *cosine)
  317. ;
  318.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  319.         Macro
  320.         _FractSineCosine
  321.             move.w              #$0045,D0
  322.             dc.w                $A832
  323.         EndM
  324.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  325.         IMPORT_CFM_FUNCTION FractSineCosine
  326.     ENDIF
  327.  
  328. ;
  329. ; extern Fract FractSquareRoot(Fract source)
  330. ;
  331.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  332.         Macro
  333.         _FractSquareRoot
  334.             move.w              #$0046,D0
  335.             dc.w                $A832
  336.         EndM
  337.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  338.         IMPORT_CFM_FUNCTION FractSquareRoot
  339.     ENDIF
  340.  
  341. ;
  342. ; extern Fixed FixedDivide(Fixed dividend, Fixed divisor)
  343. ;
  344.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  345.         Macro
  346.         _FixedDivide
  347.             move.w              #$0047,D0
  348.             dc.w                $A832
  349.         EndM
  350.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  351.         IMPORT_CFM_FUNCTION FixedDivide
  352.     ENDIF
  353.  
  354. ;
  355. ; extern Fixed FixedMultiply(Fixed multiplicand, Fixed multiplier)
  356. ;
  357.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  358.         Macro
  359.         _FixedMultiply
  360.             move.w              #$0048,D0
  361.             dc.w                $A832
  362.         EndM
  363.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  364.         IMPORT_CFM_FUNCTION FixedMultiply
  365.     ENDIF
  366.  
  367. ;  This next call is (source * multiplier / divisor) -- it avoids underflow, overflow by using wides 
  368. ;
  369. ; extern long MultiplyDivide(long source, long multiplier, long divisor)
  370. ;
  371.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  372.         Macro
  373.         _MultiplyDivide
  374.             move.w              #$0049,D0
  375.             dc.w                $A832
  376.         EndM
  377.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  378.         IMPORT_CFM_FUNCTION MultiplyDivide
  379.     ENDIF
  380.  
  381. ;
  382. ; extern unsigned long Magnitude(long deltaX, long deltaY)
  383. ;
  384.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  385.         Macro
  386.         _Magnitude
  387.             move.w              #$004A,D0
  388.             dc.w                $A832
  389.         EndM
  390.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  391.         IMPORT_CFM_FUNCTION Magnitude
  392.     ENDIF
  393.  
  394. ;
  395. ; extern long VectorMultiplyDivide(long count, const long *vector1, long step1, const long *vector2, long step2, long divisor)
  396. ;
  397.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  398.         Macro
  399.         _VectorMultiplyDivide
  400.             move.w              #$004B,D0
  401.             dc.w                $A832
  402.         EndM
  403.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  404.         IMPORT_CFM_FUNCTION VectorMultiplyDivide
  405.     ENDIF
  406.  
  407.  
  408.  
  409.  
  410. ;  wide operations are defined within FixMath.h only for PowerPC 
  411.     IF ¬ TARGET_CPU_PPC THEN
  412. ;
  413. ; extern wide *WideAdd(wide *target, const wide *source)
  414. ;
  415.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  416.         Macro
  417.         _WideAdd
  418.             move.w              #$004C,D0
  419.             dc.w                $A832
  420.         EndM
  421.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  422.         IMPORT_CFM_FUNCTION WideAdd
  423.     ENDIF
  424.  
  425. ;
  426. ; extern short WideCompare(const wide *target, const wide *source)
  427. ;
  428.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  429.         Macro
  430.         _WideCompare
  431.             move.w              #$004D,D0
  432.             dc.w                $A832
  433.         EndM
  434.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  435.         IMPORT_CFM_FUNCTION WideCompare
  436.     ENDIF
  437.  
  438. ;
  439. ; extern wide *WideNegate(wide *target)
  440. ;
  441.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  442.         Macro
  443.         _WideNegate
  444.             move.w              #$004E,D0
  445.             dc.w                $A832
  446.         EndM
  447.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  448.         IMPORT_CFM_FUNCTION WideNegate
  449.     ENDIF
  450.  
  451. ;
  452. ; extern wide *WideShift(wide *target, long shift)
  453. ;
  454.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  455.         Macro
  456.         _WideShift
  457.             move.w              #$004F,D0
  458.             dc.w                $A832
  459.         EndM
  460.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  461.         IMPORT_CFM_FUNCTION WideShift
  462.     ENDIF
  463.  
  464. ;
  465. ; extern unsigned long WideSquareRoot(const wide *source)
  466. ;
  467.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  468.         Macro
  469.         _WideSquareRoot
  470.             move.w              #$0050,D0
  471.             dc.w                $A832
  472.         EndM
  473.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  474.         IMPORT_CFM_FUNCTION WideSquareRoot
  475.     ENDIF
  476.  
  477. ;
  478. ; extern wide *WideSubtract(wide *target, const wide *source)
  479. ;
  480.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  481.         Macro
  482.         _WideSubtract
  483.             move.w              #$0051,D0
  484.             dc.w                $A832
  485.         EndM
  486.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  487.         IMPORT_CFM_FUNCTION WideSubtract
  488.     ENDIF
  489.  
  490. ;
  491. ; extern wide *WideMultiply(long multiplicand, long multiplier, wide *target)
  492. ;
  493.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  494.         Macro
  495.         _WideMultiply
  496.             move.w              #$0052,D0
  497.             dc.w                $A832
  498.         EndM
  499.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  500.         IMPORT_CFM_FUNCTION WideMultiply
  501.     ENDIF
  502.  
  503. ;  returns the quotient 
  504. ;
  505. ; extern long WideDivide(const wide *dividend, long divisor, long *remainder)
  506. ;
  507.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  508.         Macro
  509.         _WideDivide
  510.             move.w              #$0053,D0
  511.             dc.w                $A832
  512.         EndM
  513.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  514.         IMPORT_CFM_FUNCTION WideDivide
  515.     ENDIF
  516.  
  517. ;  quotient replaces dividend 
  518. ;
  519. ; extern wide *WideWideDivide(wide *dividend, long divisor, long *remainder)
  520. ;
  521.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  522.         Macro
  523.         _WideWideDivide
  524.             move.w              #$0055,D0
  525.             dc.w                $A832
  526.         EndM
  527.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  528.         IMPORT_CFM_FUNCTION WideWideDivide
  529.     ENDIF
  530.  
  531.     ENDIF
  532.  
  533.  
  534. ;
  535. ; extern wide *VectorMultiply(long count, const long *vector1, long step1, const long *vector2, long step2, wide *dot)
  536. ;
  537.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  538.         Macro
  539.         _VectorMultiply
  540.             move.w              #$0054,D0
  541.             dc.w                $A832
  542.         EndM
  543.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  544.         IMPORT_CFM_FUNCTION VectorMultiply
  545.     ENDIF
  546.  
  547. ;
  548. ; extern unsigned long RandomBits(long count, long focus)
  549. ;
  550.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  551.         Macro
  552.         _RandomBits
  553.             move.w              #$0056,D0
  554.             dc.w                $A832
  555.         EndM
  556.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  557.         IMPORT_CFM_FUNCTION RandomBits
  558.     ENDIF
  559.  
  560. ;
  561. ; extern void SetRandomSeed(const wide *seed)
  562. ;
  563.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  564.         Macro
  565.         _SetRandomSeed
  566.             move.w              #$0057,D0
  567.             dc.w                $A832
  568.         EndM
  569.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  570.         IMPORT_CFM_FUNCTION SetRandomSeed
  571.     ENDIF
  572.  
  573. ;
  574. ; extern wide *GetRandomSeed(wide *seed)
  575. ;
  576.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  577.         Macro
  578.         _GetRandomSeed
  579.             move.w              #$0058,D0
  580.             dc.w                $A832
  581.         EndM
  582.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  583.         IMPORT_CFM_FUNCTION GetRandomSeed
  584.     ENDIF
  585.  
  586.  
  587.  
  588.  
  589.     ENDIF ; __GXMATH__ 
  590.  
  591.